import Vue from 'vue'
import vuex from 'vuex'
Vue.use(vuex)

import home from './home/home.js'
import search from './search/search.js'
import detail from './detail/detail.js'
import shopcart from './shopcart/shopcart.js'
import user from './user/user'
import trade from './trade/trade'

// 对外暴露store类的一个实例
export default new vuex.Store({
    // vuex模块化【大仓库拆成多个小仓库】
    modules: {
        home,
        search,
        detail,
        shopcart,
        user,
        trade
    }
})